<?php
declare (strict_types=1);

namespace app\model;

use think\Model;

/**
 * @mixin Model
 */
class Warehouse extends Model
{
    //
    public function adminUser()
    {
        return $this->hasOne(Users::class, 'id', 'admin_user_id');
    }

    public function materials()
    {
        return $this->hasMany(Materials::class, 'warehouse_id', 'id');
    }
}
